import React from "./react";
import ReactDOM from "./react-dom";

const element = React.createElement(
  "h2",
  {
    className: "title",
    style: { color: "red" },
  },
  React.createElement("span", null, "hellow"),
  " world"
);


function WelCome(props) {
  console.log(props,'组件里的变量')
  return (<h1>你好 {props.name}</h1>);
}

class Test extends React.Component{
  constructor(props) {
    super(props)
  }

  render(){
    return (<div>继承渲染</div>)
  }

}

ReactDOM.render(<Test />, document.getElementById("root"));

// {"type":"h2","props":{"className":"title","style":{"color":"red"},"children":[{"type":"span","props":{"children":"hellow"}}," world"]}}
